# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Daniel Isenmann <daniel@archlinux.org>

pkgname=libgdiplus
pkgver=5.6.1
pkgrel=4
url='https://www.mono-project.com/docs/gui/libgdiplus/'
pkgdesc='Open Source Implementation of the GDI+ API'
arch=('loong64' 'x86_64')
license=('MPL' 'LGPL')
depends=('libtiff' 'libjpeg' 'libpng' 'cairo' 'giflib' 'libgif.so' 'glib2'
         'libexif' 'zlib' 'freetype2')
source=(https://github.com/mono/libgdiplus/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('deff863023950b1d1de7e47e44fc31c8ba39cfc06334737261965f697b2ad312')
sha512sums=('fe6a798da6ad194d4e1d3ce2ebb71a43d3f2f3d198bdf053e8a03e861c81c1c838f3d5d60cfde6b1d6f662fb7f9c2192a9acc89c30a65999e841f4ad7b180baf')

prepare() {
  cd ${pkgname}-${pkgver}
  autoreconf -fiv
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr \
    --with-cairo=system
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 NEWS README TODO AUTHORS ChangeLog -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
